echo off

taskkill /f /im NetSet.exe
taskkill /f /im ui.exe

echo on

ping 1 -n 1 -w 300 2>nul 1>nul
start /min "netset server 8001 8082"  ..\bin\NetSet.exe netset 8002 0 192.168.2.109 8090 
ping 1 -n 1 -w 300 2>nul 1>nul

start /min "manage"  ..\bin\NetSet.exe manage 8080

ping 1 -n 1 -w 200 2>nul 1>nul
start /min "ui.exe"  ..\bin\ui.exe set 1 192.168.2.109 8001 192.168.2.110 8081 1 1000000 200 200 
ping 1 -n 1 -w 200 2>nul 1>nul
start /min "ui.exe"  ..\bin\ui.exe set 2 192.168.2.110 8002 192.168.2.109 8081 1 1000000 200 200 

ping 1 -n 1 -w 200 2>nul 1>nul
..\bin\ui.exe get statecheck

ping 1 -n 5 -w 200 2>nul 1>nul

..\bin\ui.exe get state 1
ping 1 -n 1 -w 200 2>nul 1>nul
..\bin\ui.exe get state 2

ping 1 -n 1 -w 200 2>nul 1>nul
..\bin\ui.exe get stateall